package io.demo1_file;

import java.io.File;

public class Test2 {
    public static void main(String[] args)throws Exception {
        File f=new File("d:/work");
        //f=new File("1.txt");
        System.out.println(f.getName());
        System.out.println(f.getParent());
        System.out.println(f.getPath());
        System.out.println(f.getAbsolutePath());
        System.out.println(f.isFile());
        System.out.println(f.isDirectory());
        f.delete();
        //f.createNewFile();
        String[]arr=f.list();
        for(String name:arr){
            System.out.println(name);
        }
        f.listFiles();
        File dir=new File("d:/work/abc/123");
        //dir.mkdir();
        dir.mkdirs();

    }
}
